
import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
import vueJsx from "@vitejs/plugin-vue-jsx";
import removeConsole from "vite-plugin-remove-console";
import {resolve} from "path"
// import Components from 'unplugin-vue-components/vite';
// import { VantResolver } from 'unplugin-vue-components/resolvers';
// import Components from 'unplugin-vue-components/vite'
// https://vitejs.dev/config/
export default defineConfig({
	
	resolve:{
		alias:[
			{
				find:"@",
				replacement:resolve(__dirname,'src')
			}
		]
	},

    build : {
        minify : 'terser' ,
        terserOptions : {
            compress : {
                drop_console : true ,
                drop_debugger : true ,
            } ,
        } , 
    } ,
	// server:{
	// 	port:1314,
	// 	// 选项写法
	// 	proxy:{
	// 		'/pag': {
	// 			target: 'https://cdn.tmui.design',
	// 			changeOrigin: true,
	// 			rewrite: (path) => path.replace(/^\/api/, '/api')
	// 		},
	// 	}
	// },
	plugins: [
		uni(),
		vueJsx(),
        removeConsole()
        // Components({
        //     resolvers: [VantResolver()],
        // }),
	]
});

